#ifndef STORAGE_LEVELDB_BLOOM_FILTER_BUILDER_H
#define STORAGE_LEVELDB_BLOOM_FILTER_BUILDER_H

#include <stdint.h>
#include <stddef.h>

#include "leveldb/options.h"
#include "leveldb/slice.h"

#include "table/bloom_filter.h"

namespace leveldb {

class BloomFilterBuilder {
 public:
  explicit BloomFilterBuilder(const BloomFilterOptions* options);

  virtual void Add(const Slice& key);

  virtual Slice Finish() { // TODO
		return Slice(bloom_filter_.bits_,
								 bloom_filter_.size());
  }

  size_t CurrentSizeEstimate() const { return bloom_filter_.size(); }

 private:
  const BloomFilterOptions*		options_;
  BloomFilter					bloom_filter_;
  //BloomFilterHash				bloom_filter_hash_;

  // Not allow
  BloomFilterBuilder(const BloomFilterBuilder&);
  void operator=(const BloomFilterBuilder&);
};

} // namespace leveldb


#endif

